<template>
  <div class="ceshi">
    <el-button @click="addNew">添加</el-button>

    <diyTable
      class="diyTable"
      ref="diyTable"
      :column="column"
      :trLength="trLength"
      :tableDataMap="tableDataMap"
    ></diyTable>
    <!-- <diySingTable
      class="diyTable"
      ref="diyTable"
      :column="column"
      :trLength="trLength"
      :tableDataMap="tableDataMap"
    ></diySingTable> -->
    <!-- <deepSearch></deepSearch> -->
    <!-- <aaa :data="bigData" :itemHeight="50" :visibleCount="10"></aaa> -->
    <!-- <aaatable></aaatable> -->
    <!-- <el-button @click="ceshi11">测试</el-button> -->
  </div>
</template>

<script>
import diyTable from "./diy_table.vue";
import deepSearch from "./tableComponent/deepSeach,.vue";
import aaatable from "./virtual/table.vue";
import diySingTable from "./diy_sing_table.vue";
export default {
  data() {
    return {
      column: [
        { label: "权利要求", width: "200px", id: 1, basic: true },
        {
          target: true,
          id: 2,
          left: {
            label: "专利特征",
            pnNumber: "1",
          },
          right: {
            label: "申请日",
            pnNumber: "2010.04.22",
          },
        },
        {
          contrast: true,
          id: 3,
          left: {
            label: "对比专利",
            pnNumber: "2",
          },
          right: {
            label: "申请日",
            pnNumber: "2010.04.22",
          },
        },
        // {
        //   contrast: true,
        //   id: 4,
        //   left: {
        //     label: "对比专利",
        //     pnNumber: "3",
        //   },
        //   right: {
        //     label: "申请日",
        //     pnNumber: "2010.04.22",
        //   },
        // },
        // {
        //   contrast: true,
        //   id: 5,
        //   left: {
        //     label: "对比专利",
        //     pnNumber: "4",
        //   },
        //   right: {
        //     label: "申请日",
        //     pnNumber: "2010.04.22",
        //   },
        // },
        // {
        //   contrast: true,
        //   id: 6,
        //   left: {
        //     label: "对比专利",
        //     pnNumber: "5",
        //   },
        //   right: {
        //     label: "申请日",
        //     pnNumber: "2010.04.22",
        //   },
        // },
        // {
        //   contrast: true,
        //   id: 7,
        //   left: {
        //     label: "对比专利",
        //     pnNumber: "6",
        //   },
        //   right: {
        //     label: "申请日",
        //     pnNumber: "2010.04.22",
        //   },
        // },
        // {
        //   contrast: true,
        //   id: 8,
        //   left: {
        //     label: "对比专利",
        //     pnNumber: "7",
        //   },
        //   right: {
        //     label: "申请日",
        //     pnNumber: "2010.04.22",
        //   },
        // },
      ],
      tableDataMap: {
        1: {
          1: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            {
              content:
                "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
              trans: "翻译",
            },
          ],
          2: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
          3: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
          4: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
          ],
          5: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
            { content: "一种钢球自动压装装置", trans: "翻译" },
          ],
          6: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
        },
        2: {
          1: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            {
              content:
                "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
              trans: "翻译",
            },
          ],
          2: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            // {
            //   content:
            //     "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
            //   trans: "翻译",
            // },
          ],
          3: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
        },
        3: {
          1: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            {
              content:
                "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
              trans: "翻译",
            },
          ],
          2: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
          3: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
        },
        4: {
          1: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            {
              content:
                "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
              trans: "翻译",
            },
          ],
          2: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
          3: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
        },
        5: {
          1: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            {
              content:
                "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
              trans: "翻译",
            },
          ],
          2: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
          3: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
        },
        6: {
          1: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            {
              content:
                "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
              trans: "翻译",
            },
          ],
          2: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
          3: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
        },
        7: {
          1: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            {
              content:
                "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
              trans: "翻译",
            },
          ],
          2: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
          3: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
        },
        8: {
          1: [
            { content: "一种钢球自动压装装置", trans: "翻译" },
            {
              content:
                "所述钢球压装机构(4)包括压装机架(41)、待压定位板(44)待压定位板(44)",
              trans: "翻译",
            },
          ],
          2: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
          3: [{ content: "一种钢球自动压装装置", trans: "翻译" }],
        },
      },
      trLength: [
        { isPri: true },
        // { isPri: true },
        // { isPri: true },
        // { isPri: false },
        // { isPri: false },
        // { isPri: false },
      ], //长度是固定的
    };
  },
  components: {
    diyTable,
    deepSearch,
    // aaa,
    aaatable,
    diySingTable,
  },
  async mounted() {},
  methods: {
    async ceshi11() {
      let res = await this.$store.dispatch("module1/setDataM11");
      console.log(res);
    },
    addNew() {
      this.column.push({
        new: true,
        id: 8,
        left: {
          label: "新的专利",
          pnNumber: "7",
        },
        right: {
          label: "申请日",
          pnNumber: "2010.04.22",
        },
      });
      this.$refs.diyTable.addNew();
    },
    ceshi1() {
      console.log(22222);
      this.emptyDom = !this.emptyDom;
    },
    ceshi() {
      console.log(11111);
    },
  },
};
</script>
<style scoped lang="less">
.ceshi {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.diyTable {
  flex: 1;
  min-height: 0;
}
</style>
